﻿<!--
******************************************************************************************************
//  Styles.xaml
//
//  Copyright © 2014, Kevin D. Jones.  All Rights Reserved.
//
//  This file is licensed to you under the Eclipse Public License -v 1.0 (the "License"); you may
//  not use this file except in compliance with the License. You may obtain a copy of the License at:
//
//      http://www.opensource.org/licenses/eclipse-1.0.php
//
//  Unless agreed to in writing, the subject software distributed under the License is distributed on an
//  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
//  License for the specific language governing permissions and limitations.
//
//  Code Modification History:
//  **************************************************************************************************
//  02/01/2014 - Kevin D. Jones
//       Generated original version of source code.
//
//****************************************************************************************************
-->
    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
             xmlns:Synchrophasor="clr-namespace:SynchrophasorAnalytics.Networks;assembly=SynchrophasorAnalytics">
    <Style TargetType="Label" x:Key="SegoeFontStyle">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Light" />
    </Style>
    <Style TargetType="Label" x:Key="LabelStyle" BasedOn="{StaticResource SegoeFontStyle}">
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="ComboBox" x:Key="ComboBoxStyle">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Light" />
    </Style>
    <Style TargetType="TextBox" x:Key="TextBoxStyle">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Light" />
    </Style>
    <Style TargetType="CheckBox" x:Key="CheckBoxStyle">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Light" />
    </Style>

    <ControlTemplate x:Key="IntegerValidationTemplate">
        <Grid>
            <Label Foreground="Red" HorizontalAlignment="Right" VerticalAlignment="Center">Value can only be an integer</Label>
            <Border BorderThickness="1" BorderBrush="Red">
                <AdornedElementPlaceholder />
            </Border>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="FloatingPointValidationTemplate">
        <Grid>
            <Label Foreground="Red" HorizontalAlignment="Right" VerticalAlignment="Center">Value can only be an floating point</Label>
            <Border BorderThickness="1" BorderBrush="Red">
                <AdornedElementPlaceholder />
            </Border>
        </Grid>
    </ControlTemplate>

</ResourceDictionary>